/*
-----------------------------------------------------------------------------
This source file is part of Labor3D
(Labor 3D Graphics Engine)

Copyright (c) 2011-2020 Rock Mao
* creator : Rock Mao
* created : 2011-6-27   22:29
* filename: LaborD3D11Helps.h
-----------------------------------------------------------------------------
*/

#ifndef __LABORD3D11HELPS_H__
#define __LABORD3D11HELPS_H__
#include "LaborD3D11Def.h"
#include "Renderer\LaborHardwareBuffer.h"
#include "LaborD3D11Headers.h"
NAMESPACE_LABOR3D_BEGIN

const int NBYTE_ALAIGN = 4;

class CLD3D11Helps
{
public:
	/// enum identifying D3D11 tex. types
	enum eLD3DTexType
	{
		/// standard texture
		D3D_TEX_TYPE_NORMAL,
		/// cube texture
		D3D_TEX_TYPE_CUBE,
		/// volume texture
		D3D_TEX_TYPE_VOLUME,
		/// just to have it...
		D3D_TEX_TYPE_NONE
	};

	/// enum identifying D3D11 filter usage type
	enum eLD3DFilterUsage
	{
		/// min filter
		D3D_FUSAGE_MIN,
		/// mag filter
		D3D_FUSAGE_MAG,
		/// mip filter
		D3D_FUSAGE_MIP
	};

public:
	static D3D11_USAGE _getUsage(EHB_Usage mUsage);
	static D3D11_USAGE _getUsage(int mUsage);
	static bool _isDynamic(EHB_Usage mUsage);
	static UINT _getAccessFlags(EHB_Usage mUsage);
	static UINT _getAccessFlags(int mUsage);

	static DXGI_FORMAT     _getIndexType(eLIndexType eIdxType );
	static UINT            _getBufferBindFlag(eLHardwareBufferType _type ); 


};

NAMESPACE_LABOR3D_END

#endif //__LABORD3D11HELPS_H__
